<template>
	<view>
		<view class="nav-bar">
			<image src="../../../static/back_icon.png" @tap="back" mode=""></image>
			<view class="center">
				设置
			</view>
			<view class="right">
			</view>
		</view>
		<view class="item">
			<view class="logon" @tap="show">
				退出登录
			</view>
		</view>
		<tui-modal :show="modal"   :custom="true" :maskClosable="false">
			<view class="content">
				<view class="middle">
					确定退出登录？
				</view>
				<view class="bottom">
					<view class="con con-left" @tap="hide">
						取消
					</view>
					<view class="con">
						确认
					</view>
				</view>
			</view>
		</tui-modal>
	</view>
</template>

<script>
	import tuiModal from "@/components/modal/modal.vue"
	export default {
		components: {
			tuiModal
		},
		data() {
			return {
				modal:false,
			}
		},
		methods: {
			//导航方法
			back() {
				uni.navigateBack({
					delta: 1
				});
			},
			show(){
				this.modal=true;
			},
			hide(){
				this.modal=false;
			},
		}
	}
</script>

<style scoped lang="scss">
	.nav-bar {
		height: 128upx;
		padding: 40upx 28upx 0;
		background: #E8271B;
		display: flex;
		align-items: center;
		justify-content: space-between;
		position: fixed;
		width: 750upx;
		z-index: 9;

		image {
			width: 48upx;
			height: 48upx;
		}

		.center {
			font-size: 36upx;
			font-weight: 500;
			line-height: 70upx;
			color: rgba(255, 255, 255, 1);
		}

		.right {
			width: 48upx;
			height: 48upx;
		}
	}

	.item {
		padding-top: 128upx;

		.logon {
			margin-top: 20upx;
			text-align: center;
			height: 100upx;
			background: rgba(255, 255, 255, 1);
			line-height: 100upx;
			font-size: 32upx;
			font-weight: 500;
			color: rgba(51, 51, 51, 1);
		}
	}
	//模态框
	.content{
		.top{
			text-align: center;
			font-size:30upx;
			font-weight:bold;
			line-height:70upx;
			color:rgba(232,39,27,1);
		}
		.middle{
			height: 100upx;
			text-align: center;
			border-bottom: 1upx solid #F2F2F2;
			margin: 0 -12%;
		}
		.bottom{
			display: flex;
			.con{
				text-align: center;
				width: 50%;
				margin-bottom: -15upx;
				font-size:36upx;
				font-weight:500;
				color:rgba(232,39,27,1);
			}
			.con-left{
				color:rgba(51,51,51,1);
				border-right: 1upx solid #F2F2F2;
			}
		}
	}
</style>
